#include<bits/stdc++.h>
using namespace std;
template<typename Tp> inline void read(Tp &x){
    x=0;bool f=0;
    char c=getchar();
    while(!isdigit(c)&&c!='-')c=getchar();
    if(c=='-')f=1,c=getchar();
    while(isdigit(c))x=x*10+c-'0',c=getchar();
    if(f)x=-x;
}
template<typename Tp> inline void write(Tp x){
    if(x<0)putchar('-'),x=-x;
    if(x/10)write(x/10);
    putchar(x%10+'0');
}
const int N=100005;
int n,r[N],ans;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    read(n);
    ans=n;
    for(int i=1;i<=n;i++)read(r[i]);
    sort(r+1,r+1+n);
    int s=1;
    for(int i=1;i<=n;i++){
        if(s>n)break;
        int t=upper_bound(r+s,r+1+n,r[i])-r;
        if(t<=n)s=t+1,ans--;
        else break;
    }
    write(ans);
    fclose(stdin);
    fclose(stdout);
    return 0;
}